package com.heima.user.controller;

import com.heima.model.common.dtos.PageRequestDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.model.user.pojos.ApUserRealname;
import com.heima.user.service.UserRealnameService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
public class UserRealnameController {
    @Autowired
    private UserRealnameService userRealnameService;
    @PostMapping("/api/v1/list")
    public PageResponseResult list(@RequestBody ApUserRealnameDto dto){
        return userRealnameService.getList(dto);
    }

    @PostMapping("/api/v1/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto){
        return userRealnameService.authFail(dto);
    }

    @PostMapping("/api/v1/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto){
        return userRealnameService.authPass(dto);
    }
}